fix(selection): allow empty line selection - #310
Open
ilan-schemoul wants to merge 1 commit into
Open
Conversation
A common use case is to send the reference of an empty line to Claude for it to implement. Some guard clause prevents it. I see no good reason, it works without the condition and greatly improve the use case described above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sel_to_send.selection.isEmptyguard insend_at_mention_for_visual_selectionso an empty-line selection can still be sent as an at-mention.Motivation
A common use case is sending the reference of an empty line to Claude so it can implement something there. The previous guard rejected this (I don't know why) but it works fine without the check.